home *** CD-ROM | disk | FTP | other *** search
- RandomX V1.1 on 24/08/94
- ========================
-
- WHAT DOES IT DO?
- ----------------
-
- This programme creates random numbers. Wow.. NOT!. Maybe it seems pretty
- useless to you at the moment but I'll give some examples where it could be
- usefull.
-
- AND HOW IS THIS USEFUL TO ME?
- -----------------------------
-
- Random backdrop patterns - have you got several screens you like using as
- backdrops? Then this programme can be used in CLI from your startup-
- sequence to display different patterns every time you boot up. Unlike other
- Random number generator programmes, this programme doesn't just use the
- date and time to generate a random number. This means that if you have
- an Amiga without a clock (e.g a standard A1200) everytime you perform
- a boot up a new backdrop will still appear. Even if the clock still says its
- January 91 or whatever.
-
- I can't actually think of other CLI examples at the moment :-( but I'm sure
- they're out there.
-
- Your own (assembly language) programmes - you can either call this programme
- using _LVOExecute or using the assembly source I have included. You can
- use this source in any programme commercial or not. All I ask is a mention
- in the credits or a note :-)
-
- Also AREXX scripts can call this programme to generate a truly random
- number.
-
- HOW DO I USE IT?
- ----------------
-
- If you type 'randomx ?' from CLI you will get this message:
-
- RandomX V1.1, by A.Leppard 24/08/94. Creates a random number.
- To use: type Randomx [minnumber] [maxnumber]
-
- Where minnumber and maxnumber have a maximum range of 65,535 (I cant see
- anyone having that many backdrops!). Examples of use:
-
- randomx 1 218 <- random number between 1 and 218 inclusive
- randomx -10 10 <- random number between -10 and 10 ''
- randomx -1 -1000 <- random number between -1 and -1000
- randomx -10.009 -1.000 <- random number between -10.009 -1.000
-
- randomx 0.000009 0.000001
-
- etc...
-
- Basically minnumber does not have to be less than maxnumber and that
- they can be positive or negative and have decimal points.
-
- using for random backdrops
- --------------------------
-
- First of all put randomx in your C: directory.
-
- WB2,3+
- ------
-
- Say you had 18 different backdrop pictures and you wanted them to be
- used on workbench randomly. Name the pictures 1,2,3,4,5,6,7 etc up to 18.
- Have them in the same drawer, for example say you had a drawer in prefs
- called patterns (sys:prefs/patterns) with the pictures. Add thse commands
- before the 'loadwb' command in your startup sequence:
-
- randomx 1 18 >env:pattern
- copy sys:prefs/patterns/$pattern sys:prefs/patterns/backdrop
-
- Then set the WBPattern programme to display the picture:
-
- 'sys:prefs/patterns/backdrop'
-
- as your backdrop.
-
- WB1.3 or lower
- --------------
-
- Using the same commands as above you can then use your own custom
- workbench pattern programme to display them. There are workbench backdrop/
- pattern programmes available in the P.D.
-
- HISTORY
- -------
-
- V1.0 - Initial release.
-
- V1.1 - No bug fixes as such, fixed the output a bit so it didnt print
- null characters so doing a copy `randomx 12` ram:
- should copy a file between 1 and 12 to the ram drawer. Also made
- the output even more random.
-
-
- END BIT
- -------
-
- Hope someone out there finds this programme useful. Thanks go to
- Daniel O'Connor and Adrian Jenkin for the idea. The dos commands above
- come from Daniel.
-
- cul8r all!
-
- Internet: 9405571x@lux.levels.unisa.edu.au
- or on Fred's BBS: +618-341-5944
-
- cu,
- Andrew Leppard